<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"
            +request.getServerName()+":"
            +request.getServerPort()+path+"/";
%>

<base href="<%=basePath%>">

<html>
<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

	<!-- Bootstrap CSS -->
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

	<title>角色管理</title>
</head>
<body>
<%
		//设置编码方式
		request.setCharacterEncoding("utf-8");
		//接收参数
		String  keyword=request.getParameter("keyword");
 %>

<div class="alert alert-primary" role="alert">
	<a href="${pageContext.request.contextPath}/page/role/role_add.jsp" class="alert-link">添加</a>
</div>

<div class="padding border-bottom">
				<ul class="search" style="padding-left:10px;">
					<li>搜索：</li>
					<li><input type="text" placeholder="请输入搜索关键字" name="keyword"
						class="input" value="<%=keyword==null?"":keyword %>"
						style="width:250px; line-height:17px;display:inline-block" /> 
						<input type="submit" class="button border-main icon-search" value="搜索"></input>
					</li>
				</ul>
			</div>

<table class="table">
	<thead>
	<tr>
		<th scope="col">角色编号</th>
		<th scope="col">角色名称</th>
		<th scope="col">姓名</th>
		
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${roles}" var="r">
		<tr>
			<td>${r.roleid}</td>
			<td>${r.roleName}</td>
			<td>${r.fullName}</td>
			
			<td align="center"><a href="edit.Do?roleid=${r.roleid}">修改</a>|
				<a align="center" href="delete.Do?roleid=${r.roleid}">删除</a>
			</td>
		</tr>
	</c:forEach>
	</tbody>
</table>

</body>
</html>
